package lee.vioson.remotedata.repositories

import kotlinx.coroutines.flow.Flow
import lee.vioson.remotedata.bean.Book
import lee.vioson.remotedata.bean.BookData
import lee.vioson.remotedata.bean.ChapterInfo

/**
 *Author:viosonlee
 *Date:2023/6/16
 *DESCRIPTION:
 */
interface BookRepository {
    fun fetchBookDetail(uniqueId: String, bookId: String): Flow<BookData>

    fun changeCollection(uniqueId: String, addCollection: Boolean, bookId: String): Flow<Boolean>

    fun doSearch(pageIndex: Int, searchText: String): Flow<List<Book>>

    fun markBookView(uniqueId: String, bookId: String): Flow<Boolean>

    fun chapterDetail(uniqueId: String, chapterId: String): Flow<List<ChapterInfo>>
}